package Demo01;

public class Test {
}

/*
public class ListNode {
    int val;
    ListNode next = null;

    ListNode(int val) {
        this.val = val;
    }
}*/
/*
public class PalindromeList {
    public boolean chkPalindrome(ListNode A) {
        if(A==null) {
            return true;
        }
        if(A.next==null) {
            return true;
        }
        ListNode newNode = new ListNode(-1);
        int count = 0;
        ListNode fast = A;
        ListNode slow = A;
        while(fast.next!=null) {
            if(count%2==0) {
                slow = slow.next;
            }
            fast=fast.next;
            count++;
        }
        if(count%2==0) {
            slow = slow.next;
        }
        ListNode wNode = slow.next;
        slow.next=null;
        while(wNode!=null) {
            ListNode tmp = slow;
            slow = wNode;
            wNode = wNode.next;
            slow.next = tmp;
        }
        while(slow!=null) {
            if(slow.val!=A.val) {
                return false;
            }
            slow = slow.next;
            A = A.next;
        }
        return true;
        // write code here
    }
}*/
